import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询岗位列表
export function listPaper(query) {
  return request({
    url: '/store/paper/list',
    method: 'get',
    params: query
  })
}

export function  paperQuestionList(query) {
  return request({
    url : '/store/paper/paperQuestionList',
    method:'get',
    params:query
  })
}

export function addUserAnswer(query){
  return request({
    url:'/store/paper/addUserAnswer',
    method:'POST',
    data:query
  })
}

export function  paperById(query) {
  return request({
    url : '/store/paper/paperDetail',
    method:'get',
    params:query
  })
}


export function getPaper(paperId) {
  return request({
    url: '/store/paper/' +  parseStrEmpty(paperId),
    method: 'get'
  })
}

// 新增岗位
export function addPaper(data) {
  return request({
    url: '/store/paper',
    method: 'post',
    data: data
  })
}



// 删除岗位
export function delPaper(paperIds) {
  return request({
    url: '/store/paper/' + paperIds,
    method: 'delete'
  })
}


export function getStoreCount(storeId){
  return request({
    url: '/store/paper/counts/' + storeId,
    method:'get'
  })
}
